findElementByCssSelector

public abstract Optional<Element> findElementByCssSelector(String cssSelector)

Returns the first Element object found in the current search context by the given cssSelector. Returns an empty Optional if no element was found.

Parameters

cssSelector

a string that represents the CSS selector

Throws

if the given cssSelector is empty

when this instance is closed